//物料列表页面接口
import request from '@/utils/axios-req'

//查询物料列表
export const materialSelectlist = (query) => {
  return request({
    url: '/admin/material-information/materials',
    method: 'get',
    params: query
  })
}
//物料添加编辑
export const materialadd = (query) => {
  return request({
    url: '/admin/material-information/saveMaterial',
    method: 'post',
    reqLoading: false,
    data: query
  })
}
//物料删除
export const materialdelete = (query) => {
  return request({
    url: `/admin/material-information/deleteMaterial`,
    method: 'DELETE',
    reqLoading: false,
    params: query
  })
}
//物料状态改变
export const materialdisables = (query) => {
  return request({
    url: '/admin/material-information/updateMaterialState',
    method: 'PUT',
    reqLoading: false,
    params: query
  })
}
//物料导入
export const materialimports = (query) => {
  return request({
    url: '/material/imports',
    method: 'post',
    reqLoading: false,
    data: query
  })
}
//单个物料信息查询
export const getoneinfo = (query) => {
  return request({
    url: '/admin/material-information/getMaterialById',
    method: 'get',
    reqLoading: false,
    params: query
  })
}
